import {Component} from '@angular/core';
import {SelectItem} from 'primeng/primeng';
import {CarService} from '../service/carservice';
import {CountryService} from '../service/countryservice';
import 'rxjs/Rx';
@Component({
    templateUrl: './checkboxdemo.html',
    styles: [`
        .ui-grid .ui-grid-col-1,
        .ui-grid .ui-grid-col-11 {
            padding: 4px 10px;
        }

        .ui-grid label {
            display: block;
            margin: 2px 0 0 4px;
        }

        h1{color:#ff8800;}
        h2{
          background: #e0e0e0;
          text-align: center;
          line-height: 4rem;

        }

    `]
})

export class CheckboxDemo {

    selectedCities: string[] = [];
    selectedCategories: string[] = ['Technology', 'Sports'];
    checked: boolean = false;
}

export class ChipsDemo {

    values1: string[];
    values2: string[];
}

export class EditorDemo {

   text1: string = '<div>Hello World!</div><div>PrimeNG <b>Editor</b> Rocks</div><div><br></div>';
   text2: string;
}

export class InputTextDemo {

    text: string;
    disabled: boolean = true;

    toggleDisabled() {
        this.disabled = !this.disabled;
    }
}

export class InputTextareaDemo {

}

export class InputMaskDemo {

    val1: string;
    val2: string;
    val3: string;
    val4: string;
    val5: string;
    val6: string;
}

export class SpinnerDemo {

    val1: number;
    val2: number;
    val3: number;
    val4: number = 100;
}

export class ToggleButtonDemo {

    checked1: boolean = false;
    checked2: boolean = true;
}

export class InputSwitchDemo {

    checked3: boolean = false;
    checked4: boolean = true;
}

export class RadioButtonDemo {

    val1: string;
    val2: string = 'Option 2';
}
export class PasswordDemo {

}

export class TriStateCheckboxDemo {
    value: any;
}

export class RatingDemo {

  val1: number;
  val2: number = 5;
  val3: number;
  val4: number = 5;
   msg: string;

    handleRate(event) {
        this.msg = "You have rated " + event.value;
    }

    handleCancel(event) {
        this.msg = "Rating Cancelled";
    }
}

export class MultiSelectDemo {

    cars: SelectItem[];
    selectedCars: string[] = [];

    constructor() {
        this.cars = [];
        this.cars.push({label: 'Audi', value: 'Audi'});
        this.cars.push({label: 'BMW', value: 'BMW'});
        this.cars.push({label: 'Fiat', value: 'Fiat'});
        this.cars.push({label: 'Ford', value: 'Ford'});
        this.cars.push({label: 'Honda', value: 'Honda'});
        this.cars.push({label: 'Jaguar', value: 'Jaguar'});
        this.cars.push({label: 'Mercedes', value: 'Mercedes'});
        this.cars.push({label: 'Renault', value: 'Renault'});
        this.cars.push({label: 'VW', value: 'VW'});
        this.cars.push({label: 'Volvo', value: 'Volvo'});
    }
}
